//导航区域
@headerHeight: 60px;

@headerDarkTextColor: #dadada;
@headerDarkTextHoverColor: lighten(@headerDarkTextColor,20%);
@headerDarkBackGroundColor: #303641;
@headerDarkBackGroundHoverColor: darken(@headerDarkBackGroundColor,5%);
 
@headerDefaultTextColor: #898989;
@headerDefaultTextHoverColor: darken(@headerDefaultTextColor,80%);;
@headerDefaultBackGroundColor: #fff;
@headerDefaultBackGroundHoverColor: darken(@headerDefaultBackGroundColor,5%);
.ssy-header {
    height: @headerHeight;
    .logo-text {
        float: left;
        font-size: 1.25rem;
        line-height: @headerHeight;
        margin-right: 1rem;
        font-weight: 500;
    }
    .header-list {
        float: left;
        padding: 0px;
        list-style: none;
        .header-item {
            display: inline-block;
            .header-link {
                display: block;
                cursor: pointer;
                line-height: @headerHeight;
                font-weight: 500;
            }
        }
    }
    .header-search {
        position: relative;
        line-height: 60px;
        display: inline-block;
        .form-control {
            vertical-align: inherit;
        }
        .search-icon {
            position: absolute;
            right: -4px;
            top: 10px;
            background-color: transparent;
        }
    }
    .header-search-link-warp {
        height: 60px;
        line-height: 60px;
        margin-right: 30px;
        float: right;
        .search-icon {
            padding: 10px 10px;
        }
    }
    .header-account {
        float: right;
        .header-login {
            line-height: 60px; 
        }
        .header-user {
            line-height: 60px;
            .dropdown {
                display: inline-block;
            .dropdown-item {    
                line-height: 1.6;
            }
            }
        }
    }
    &.ssy-header-fixed {
        position: fixed;
        width: 100%;
        z-index: 999;
        top: 0;
    }
    &.ssy-header-fixed + * {
        margin-top: 75px;
    }
    &.ssy-header-default {
        background-color: @headerDefaultBackGroundColor; 
        border-bottom: 1px solid #e1e4e8;
        .logo-text {
            color: @primaryColor;   
            a {
                color: @primaryColor;
                &.active,&:hover {
                    background-color: transparent;
                    color: @primaryColor;
                }
            }
        }
        .header-link {
            padding: 0 0.4rem;
            &.active,&:hover {
                background-color: transparent;
                color: @primaryColor;
            }
        }
    }
    
    &.ssy-header-dark {
        background-color: @headerDarkBackGroundColor;
        color: @headerDarkTextColor;
        .logo-text {
            a {
                color: @headerDarkTextColor;
                &.active,&:hover {
                    background-color: transparent;
                    color: @headerDarkTextHoverColor;
                }
            }
        }
        .header-link {
            color: @headerDarkTextColor;
            padding: 0 0.4rem;
            &.active,&:hover {
                background-color: @headerDarkBackGroundHoverColor;
                color: @headerDarkTextHoverColor;
            }
        }
        &.ssy-header-empty {
            .header-link {
                &.active,&:hover {
                    background-color: transparent;
                    color: @headerDarkTextHoverColor;
                }
            }
        }
    }
    &.ssy-header-primary {
        background-color: #fff;
        color: @headerDefaultTextColor;    
        border-bottom: 1px solid #e1e4e8;
        .logo-text {
            a {
                color: @primaryColor;
                &.active,&:hover {
                    background-color: transparent;
                    color: @primaryColor;
                }
            }
        }
        .header-link {
            margin: 0 0.4rem;
            color: @headerDefaultTextColor;
            line-height: @headerHeight - 4px!important;
            margin-top: 2px;
            &.active,&:hover {
                background-color: transparent;
                color: @primaryColor;
                border-bottom: 2px solid @primaryColor;
            }
        }
        &.ssy-header-empty {
            .header-link {
                &.active,&:hover {
                    background-color: transparent;
                    color: @headerDefaultTextHoverColor;
                }
            }
        }
    }
    
    
}



.header-message {
    display: inline-block;
    line-height: 60px;
    margin-right: 10px;
    
    .ssy-badge {
        font-size: 14px;
        font-variant: tabular-nums;
        line-height: 1.5;
        color: rgba(0,0,0,.65);
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        list-style: none;
        position: relative;
        display: inline-block;
        line-height: 1;
        color: unset;
    }
    
    .badge-count {
        font-family: Monospaced Number;
        line-height: 1;
        vertical-align: middle;
        position: absolute;
        -webkit-transform: translateX(50%);
        transform: translateX(50%);
        top: -10px;
        right: 0;
        height: 20px;
        border-radius: 10px;
        min-width: 20px;
        background: #ed4014;
        border: 1px solid transparent;
        color: #fff;
        line-height: 18px;
        text-align: center;
        padding: 0 6px;
        font-size: 12px;
        white-space: nowrap;
        -webkit-transform-origin: -10% center;
        transform-origin: -10% center;
        z-index: 10;
        box-shadow: 0 0 0 1px #fff
    }
        
    .message-circle {
        display: inline-block;
        width: 32px;
        height: 32px;
        line-height: 32px;
        text-align: center;
        border-radius: 50%;
        -webkit-transition: all .2s;
        transition: all .2s;
        color: #273350
    }
                    
    .message-circle:hover {
        background: #f0f8ff;
        color: #4b7dfa
    }
    .message-circle svg {
        font-size: 18px;
            cursor: pointer;
            width: 1em;
        height: 1em;
        fill: currentColor;
        vertical-align: -.125em;
    }

}


@media (max-width: 575.98px) {
    .ssy-header {
        height: auto;
        &.ssy-header-fixed + * {
            margin-top: 105px;
        }
        .container {
            padding: 0;
        }
        .logo-text {
            float: none;
            margin-right: 0;
            display: block;
            padding: 0;
            text-align: left;
            margin-left: 10px;
            line-height: 44px;
            border-bottom: 1px solid @borderColor;
        }
        .header-list {
            overflow: hidden;
            width: 100%;
            list-style: none;
            padding-left: 0;
            padding: 0;
            height: 44px;
            margin: 0;
            overflow-x: scroll;
            -webkit-overflow-scrolling: touch;
            white-space: nowrap;
            .header-link {
                line-height: 44px!important;
                padding: 0 10px;
                position: relative;
            }
        }
        .header-search-link-warp {
            margin: 0;
            background: #fff;
            position: absolute;
            right: 0;
            height: 44px!important;
            line-height: 44px!important;
        }
        .header-account {
            position: absolute;
            right: 10px;
            top: 0;
            .header-login {
                line-height: 44px;
                .ssy-btn {
                    padding: 4px 12px;
                }
            }
            .header-user {
                line-height: 44px;
                .header-message {
                    line-height: 44px;
                }
                .dropdown {
                    display: inline-block;
                }
            }
        }
    }
}
